package com.wbt.test;

public class Son extends Father {

    private String name;

    public Son(String name) {
        this.name = name;
    }


    @Override
    public void speak() {
        System.out.println("--子类Override了父类的方法--");
    }

    public static void main(String[] args) {
        System.out.println("--子类主程序--");

        Son son = new Son("儿子的名字");
        son.call();
    }
}
